package newDfa;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class dfaCheck {
    private int[][] dfa;
    //DFA的事件个数
    private int wayNumber;
    private boolean[] isMarked;

    public dfaCheck(int[][] dfa) {
        this.dfa = dfa;
        this.wayNumber = dfa.length;
        this.isMarked = new boolean[dfa.length];
    }
    //获得不重复事件组
    public Integer[] getEvents(){
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < dfa.length; i++) {
              if (!list.contains(dfa[i][1]))
                        list.add(dfa[i][1]);
    }
        Integer[] array = list.toArray(new Integer[list.size()]);
        Arrays.sort(array);
        return array;
    }

    public int getWayNumber() {
        return wayNumber;
    }

    public void setWayNumber(int wayNumber) {
        this.wayNumber = wayNumber;
    }

    public boolean[] getIsMarked() {
        return isMarked;
    }

    public void setIsMarked(boolean[] isMarked) {
        this.isMarked = isMarked;
    }
}
